package com.ruoyi.web.controller.system;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.ExamineFormDTO;
import com.ruoyi.system.domain.IdDto;
import com.ruoyi.system.domain.SysForm;
import com.ruoyi.system.service.ISysExamineService;
import com.ruoyi.system.service.ISysFormService;
import jakarta.servlet.http.HttpServletResponse;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 单Controller
 *
 * @author ruoyi
 * @date 2025-08-31
 */
@RestController
@RequestMapping("/system/examine")
public class SysFormExamineController extends BaseController
{
    @Autowired
    private ISysFormService sysFormService;

    @Autowired
    private ISysExamineService sysExamineService;


    @GetMapping("/form_content")
    public AjaxResult formContent(@RequestParam(value = "formName",required = false)String formName){
        return sysExamineService.formContent(formName);
    }

    @PostMapping("/do_examine")
    public AjaxResult examine(@RequestBody ExamineFormDTO dto){
        return sysExamineService.examine(dto);
    }


    @PreAuthorize("@ss.hasPermi('system:examine:detail')")
    @PostMapping("/detail")
    public AjaxResult detail(@RequestBody IdDto dto) {
        return sysExamineService.detail(dto);
    }

}
